package com.snailhd.listener;

import com.snailhd.common.entity.IResult;
import com.snailhd.entity.StockDay;
import com.snailhd.mapper.StockDayMapper;
import com.snailhd.pipeline.PipelineFuture;
import com.snailhd.pipeline.PipelineParams;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author hd
 * @description
 * @date 2019-11-23 16:06
 */

@Component
public class StockDaySaveDbListener implements Listener<List<StockDay>> {

    @Resource
    StockDayMapper stockDayMapper;

    @Override
    public void monitor(List<StockDay> stockDays) {
        stockDayMapper.insertOrUpdate(stockDays);
    }
}
